package com.xinchuang.controller;

import com.xinchuang.comment.R;
import com.xinchuang.entity.api.EditionVo;
import com.xinchuang.service.apiutil.PublicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author zkwczx
 * @version 1.0
 * @date 2023/11/1 21:36
 */
@RequestMapping(value = "/public")
@RestController
@RequiredArgsConstructor
@Api(value = "公共模块", tags = "公共模块")
public class PublicController {

    private final PublicService publicService;

    @PostMapping(value = "/getEditionInfo")
    @ApiOperation("查询版次")
    public R getEdition(@RequestBody EditionVo editionVo) {
        return publicService.getEdition(editionVo);
    }

    @PostMapping(value = "/getEditionNoticeInfo")
    @ApiOperation("查询版次")
    public R getEditionNoticeInfo(@RequestBody EditionVo editionVo) {
        return publicService.getEditionNotice(editionVo);
    }

}
